package com.hhs.storage.service;

import com.hhs.storage.bean.Contract;
import com.hhs.storage.bean.Flow;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hhs.storage.bean.Img;
import com.hhs.storage.bean.InputParam;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author hhs
 * @since 2022-12-01
 */
public interface FlowService extends IService<Flow> {


    //创建一条新记录
//    public void create(Integer type, Integer status,String mainId, String creater,  String remark);
    public void create(Integer type, Integer status,Integer statusJunior,String mainId, String creater,  String remark);
    public void createWithJsonData(Integer type, Integer status,Integer statusJunior,String mainId, String creater,  String remark,String jsonData);
    //创建一条记录，并直接结束
    public void createWithEndTime(Integer type, Integer status,String mainId, String creater,  String remark);

    Map dele(String id);
    //根据流程的关联单据id,删除该单据的所有流程信息
    Map deleByMainId(String id);

    //根据流程查询条件获取流程主单据来源信息
    Map getAll(InputParam inputParam);

    //自定义sql，根据条件用于查询全部和流程处理人名称
    List<Flow> getListAndCreater(InputParam inputParam);

    //查询当前单据的最新流程，流程未结束
    Flow getCurrent(String mainId);

    //操作进入下一步流程
    Map flowOpera(InputParam inputParam);
    Map flowDisAgree(InputParam inputParam);

    List<Flow> getByParams(InputParam inputParam);
}
